home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI Developer Toolbox 6.1
/
SGI Developer Toolbox 6.1 - Disc 1.iso
/
toolbox
/
searchtools
/
dist
/
oasisIII.idb
/
etc
/
init.d
/
okserver.z
/
okserver
Wrap
Text File
|
1996-11-11
|
3KB
|
84 lines
#!/bin/sh
#
# Start and stop oksvr(1M)
#
# Copyright 1988-1991 Silicon Graphics, Inc.
# All rights reserved.
#
# This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
# the contents of this file may not be disclosed to third parties, copied or
# duplicated in any form, in whole or in part, without the prior written
# permission of Silicon Graphics, Inc.
#
# RESTRICTED RIGHTS LEGEND:
# Use, duplication or disclosure by the Government is subject to restrictions
# as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
# and Computer Software clause at DFARS 252.227-7013, and/or in similar or
# successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
# rights reserved under the Copyright Laws of the United States.
#
# $Revision: 1.3 $
# This is the oksvr /etc/init.d/okserver startup script for
# The Developer Toolbox, version 5.0 CD, released, March 1995.
# The key to running this script correctly is to always ensure
# that the
#
# OKSVR_ROOT
#
# shell variable is defined to point to the absolute path location
# where the "searchtools" directory exists. By default this
# location is defined to be "/CDROM/searchtools". If one is
# running an HTTP server and wants to create a child directory
# of the HTTP server's Document Root to place the contents of
# this toolbox in, the OKSVR_ROOT variable will need to be
# redefined to properly point to the new "active" location of
# "searchtools". For example, suppose the HTTP server's
# Document Root is "/usr/local/www", and a directory under this
# named "toolbox" is created to house the contents of the v5.0
# CD. Then, the default OKSVR_ROOT definition would change from,
#
# OKSVR_ROOT=/CDROM/searchtools
#
# to now be,
#
# OKSVR_ROOT=/usr/local/www/toolbox/searchtools
#
IS_ON=/etc/chkconfig
OKSVR=/usr/sbin/oksvr
RM=/bin/rm
GREP=/bin/grep
ECHO=/bin/echo
PS=/bin/ps
OKSVR_ROOT=/CDROM/searchtools
case $1 in
'start')
if $IS_ON okserver && test -x /usr/sbin/oksvr; then
if $PS -e 2>/dev/null | $GREP oksvr > /dev/null 2>&1 ; then
$ECHO "OasisIII Search Server (oksvr) already running."
exit 1
else
if test -d $OKSVR_ROOT; then
$ECHO "OasisIII Search Server: oksvr started"
/bin/su root -c "env FULPATH=$OKSVR_ROOT $OKSVR &"
else
$ECHO "Error: oksvr: cannot locate Developer Toolbox Database"
$ECHO "Please see sifttree.README at top-of-tree v5.0 Developer Toolbox CD"
fi
fi
fi
;;
'stop')
killall -QUIT oksvr # send signal to kill
$RM -rf /usr/tmp/ft* # get rid of temp files
$ECHO "OasisIII Search Server: oksvr stopped"
;;
*)
echo "usage: $0 {start|stop}"
;;
esac